﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace ChurchDiary.TableEntity
{
    [Table("CH_PrayerGroupTheme")]
    public class EntityPrayerGroupTheme
    {
        [Key]
        public Guid PrayerGroupThemeId { get; set; }
        public string PrayerGroupThemeName { get; set; }
        public bool IsDeleted { get; set; }
        public Guid? CreatedBy { get; set; }
        public DateTime CreatedOn { get; set; }
        public Guid? UpdatedBy { get; set; }
        public DateTime UpdatedOn { get; set; }
    }
    [Table("CH_PrayerGroups")]
    public class EntityPrayerGroup
    {
        [Key]
        public Guid PrayerGroupId { get; set; }
        public Guid PrayerGroupThemeId { get; set; }
        public string PlaceOrNameOfPrayerGroup { get; set; }
        public Guid PrayerGroupHead { get; set; }
        /// <summary>
        /// WEEKLY
        /// MONTHLY
        /// DAILY
        /// </summary>
        public string PrayGroupShudleMode { get; set; }
        public string PrayerStartTime { get; set; }
        public string PrayerEndTime { get; set; }
        public string PrayerDate { get; set; }
        public string PrayerDay { get; set; }
        /// <summary>
        /// 1.Regular
        /// 2.No Regular
        /// </summary>
        public int PrayGroupStatus { get; set; }
        public Guid ChurchId { get; set; }
        public bool IsDeleted { get; set; }
        public Guid? CreatedBy { get; set; }
        public DateTime CreatedOn { get; set; }
        public Guid? UpdatedBy { get; set; }
        public DateTime UpdatedOn { get; set; }

        public EntityPrayerGroupTheme GroupTheme { get; set; }
        public List<EntityPrayerMembers> PrayerMembers { get; set; }
    }
    [Table("CH_PrayerMembers")]
    public class EntityPrayerMembers
    {
        [Key]
        public Guid PrayerGroupMemberId { get; set; }
        public Guid PrayerGroupId { get; set; }
        public Guid MemberId { get; set; }
        public bool IsDeleted { get; set; }
    }

    public class EntityChurchReport
    {
        public Guid CHChurchid { get; set; }
        public string ChurchName { get; set; }
        public string Email { get; set; }

        public string PartitionName { get; set; }

        public string DesignationName { get; set; }

        public string GradeName { get; set; }

        public string ContactNo { get; set; }
        public string CountryName { get; set; }
        public string StateName { get; set; }
        public string Addressline1 { get; set; }
        public string Addressline2 { get; set; }
        public string Pincode { get; set; }

    }
    [Table("CH_SubAdmin")]
    public class EntitySubAdmin
    {
        [Key]
        public string SubAdminId { get; set; }
        public string UserId { get; set; }
        public string ChurchId { get; set; }
        public int Status { get; set; }
        public int ActiveStatus { get; set; }
        public string CreatedOn { get; set; }
        public Guid? Createdby { get; set; }
        public string UpdatedOn { get; set; }
        public Guid? UpdatedBy { get; set; }

    }
    [Table("CH_ChurchBoards")]
    public class EntityChurchBoard
    {
        [Key]
        public Guid BoardId { get; set; }
        public string BoardName { get; set; }
        public string BoardAbbrivation { get; set; }
        public int status { get; set; }
        public Guid? Createdby { get; set; }
        public DateTime? CreatedOn { get; set; }
        public Guid? Updatedby { get; set; }
        public DateTime? UpdatedOn { get; set; }
    }
    [Table("CH_ChurchBoardJobtitle")]
    public class EntityChurchBoardJobtitle
    {
        [Key]
        public Guid BoardJobtitleId { get; set; }
        public Guid BoardId { get; set; }
        public string JobtitleName { get; set; }
        public bool CanHaveMultiple { get; set; }
        public int status { get; set; }
        public Guid? Createdby { get; set; }
        public DateTime? CreatedOn { get; set; }
        public Guid? Updatedby { get; set; }
        public DateTime? UpdatedOn { get; set; }

        public EntityChurchBoard ChurchBoard { get; set; }
    }
    [Table("CH_ChurchJobtitleRole")]
    public class EntityChurchJobtitleRole
    {
        [Key]
        public Guid JobtitleRoleId { get; set; }
        public Guid UserTypeId { get; set; }
        public Guid BoardJobtitleId { get; set; }
        public int status { get; set; }
        public Guid? Createdby { get; set; }
        public DateTime? CreatedOn { get; set; }
        public Guid? Updatedby { get; set; }
        public DateTime? UpdatedOn { get; set; }


        public EntityUserType UserType { get; set; }
        public EntityChurchBoardJobtitle BoardJobtitle { get; set; }
        [NotMapped]
        public int LandingPage { get; set; }
    }
    
    public class EntityChurchSammary
    {
        public int TotalChurches { get; set; }
        public int TotalActiveChurchs { get; set; }
        public int TotalInActiveChurches { get; set; }
        public int TotalLoginCreatedChurches { get; set; }
    }
    [Table("CH_Church")]
    public class EntityChurch : BaseEntity
    {
        [Key]
        public Guid ChurchId { get; set; }
        public int ChurchNo { get; set; }
        public string ContactNo { get; set; }
        public string ChurchName { get; set; }
        public int OrganizationId { get; set; }
        public Guid PartitionId { get; set; }
        public string Image { get; set; }
        public Guid GradeId { get; set; }
        public string Email { get; set; }
        public Guid DesignationId { get; set; }
        public bool IsLoginCreated { get; set; }

        
        public List<EntityChurchAsserts> ChurchAsserts { get; set; }
        public EntityGrade Grade { get; set; }
        public EntityChurchDesignation Designation { get; set; }
        public EnitityOrganizationPartition OrganizationPartition { get; set; }
        public EntityChurchContact ChurchContact { get; set; }
    }

    [Table("CH_IncomeType")]
    public class EntityIncomeType
    {
        [Key]
        public Guid IncomeTypeId { get; set; }
        public string IncomeTypeName { get; set; }
        public bool EnableIntitalAmount { get; set; }
        public double IntitalAmount { get; set; }
        public int IncomeType { get; set; }
        public string fromDate { get; set; }
        public string ToDate { get; set; }
        public bool EnableTargetAmount { get; set; }
        public double TargetAmount { get; set; }
        public int Applyto { get; set; }
        public bool EnableBarrow { get; set; }
        public int status { get; set; }
        public Guid? ChurchId { get; set; }

        public Guid? CreatedBy { get; set; }
        public DateTime? CreatedOn { get; set; }
        public Guid? UpdatedBy { get; set; }
        public DateTime? UpdatedOn { get; set; }
    }

    [Table("CH_ChurchContact")]
    public class EntityChurchContact
    {
        [Key]
        public Guid ChurchId { get; set; }
        public Guid? CountryId { get; set; }
        public Guid? StateId { get; set; }
        public string Addressline1 { get; set; }
        public string Addressline2 { get; set; }
        public string Pincode { get; set; }
        public EntityCountry Country { get; set; }
        public EntityStates State { get; set; }
    }
    [Table("CH_ChurchDesignation")]
    public class EntityChurchDesignation
    {
        [Key]
        public Guid DesignationId { get; set; }
        public int OrganizationId { get; set; }
        [Required]
        [MaxLength(64)]
        public string DesignationName { get; set; }
        public string DesignationAbrivation { get; set; }
        public int Status { get; set; }

        [NotMapped]
        public string OrganizationName { get; set; }
    }
    [Table("CH_ChurchAsserts")]
    public class EntityChurchAsserts
    {
        [Key]
        public Guid ChurchAssertsId { get; set; }
        public Guid CHChurchId { get; set; }
        public string DateOfAsserts { get; set; }
        public string NameOfAsserts { get; set; }
        public string TotalNumbers { get; set; }
        public string PriceAmount { get; set; }
        public string Remarks { get; set; }
        public Guid? CreatedBy { get; set; }
        public DateTime? CreatedOn { get; set; }
        public Guid? UpdatedBy { get; set; }
        public DateTime? UpdatedOn { get; set; }
        public int status { get; set; }
    }
    [Table("CH_ChurchGradeSettings")]
    public class EntityGrade
    {
        [Key]
        public Guid GradeId { get; set; }
        public string GradeName { get; set; }
        public string GradeRangeStart { get; set; }
        public string GradeRangeEnd { get; set; }
        public string AmountToPay { get; set; }
        public string AmountToUse { get; set; }
        public string AmountToSave { get; set; }
        public int Status { get; set; }
        public Guid? CreatedBy { get; set; }
        public DateTime? CreatedOn { get; set; }
        public Guid? UpdatedBy { get; set; }
        public DateTime? UpdatedOn { get; set; }
    }
    
}
